cd $ORACLE_HOME
mkdir mycerts
cd mycerts
keytool -genkey -keyalg RSA -alias selfsigned -keystore identity.jks -dname "CN=`hostname`, OU=My Department, O=My Company, L=Birmingham, ST=West Midlands, C=GB" -storepass welcome1 -validity 3600 -keysize 2048 -keypass welcome1
keytool -selfcert -v -alias selfsigned -keypass welcome1 -keystore identity.jks -storepass welcome1 -storetype jks -validity 3600
keytool -export -v -alias selfsigned -file "`hostname`-rootCA.der" -keystore identity.jks -storepass welcome1
keytool -import -v -trustcacerts -alias selfsigned -file "`hostname`-rootCA.der" -keystore trust.jks -storepass welcome1 -noprompt

$ORACLE_HOME/oracle_common/bin/orapki wallet create -wallet \
  $ORACLE_HOME/user_projects/domains/ohsDomain/config/fmwconfig/components/OHS/instances/ohs1/keystores/mywallet \
  -pwd welcome1 -auto_login
$ORACLE_HOME/oracle_common/bin/orapki wallet jks_to_pkcs12 -wallet \
 $ORACLE_HOME/user_projects/domains/ohsDomain/config/fmwconfig/components/OHS/instances/ohs1/keystores/mywallet \
  -pwd welcome1 -keystore $ORACLE_HOME/mycerts/identity.jks \
  -aliases selfsigned -jkspwd welcome1
